<?php
namespace App\Api\Controllers;

use App\Http\Controllers\Controller;
use App\Api\Services\JsonService;
use App\Api\Models\Goods;

class PopularController extends Controller
{
    public function getRecommendList()
    {
        $allowField = [
            'goods_name',
            'goods_image',
            'evaluate',
            'evaluate_haoping',
            'price',
            'sale_num'
        ];

        $listData = Goods::getPopularList($allowField);


        if($listData){
            return JsonService::success($listData);
        }
        return JsonService::fail('查询失败');
    }
}